home *** CD-ROM | disk | FTP | other *** search
/ NetNews Offline 2 / NetNews Offline Volume 2.iso / news / comp / lang / c-part1 / 35 < prev    next >
Encoding:
Internet Message Format  |  1996-08-05  |  1.9 KB

  1. Path: news.iag.net!news
  2. From: jatmon@iag.net (John R Buchan)
  3. Newsgroups: comp.lang.c
  4. Subject: Re: Turbo C
  5. Date: 1 Jan 1996 05:39:32 GMT
  6. Organization: The Internet Access Group, Inc.
  7. Message-ID: <4c7s2k$cr5@news.iag.net>
  8. References: <4c3r40$5uv@soap.news.pipex.net>
  9. NNTP-Posting-Host: pm3-orl1.iag.net
  10. Mime-Version: 1.0
  11. Content-Type: Text/Plain; charset=US-ASCII
  12. X-Newsreader: WinVN 0.99.6
  13.  
  14. In article <4c3r40$5uv@soap.news.pipex.net>, fab35@dial.pipex.com2 says...
  15. >
  16. >Help!!
  17. >
  18. >I am trying to get a float from a string using the stdlib.h function
  19. >'atof'.  However, when it calls this function I get the message
  20. >'scanf: floating point formats not linked
  21. >Abnormal program termination'
  22. >
  23. >Has anyone had this problem before.
  24.  
  25. Yes.  
  26.  
  27. <Quote from the c.l.c faq (Frequently Asked Question) list>
  28.  
  29. 14.13:    I'm having trouble with a Turbo C program which crashes and says
  30.     something like "floating point formats not linked."
  31.  
  32. A:    Some compilers for small machines, including Borland's (and
  33.     Ritchie's original PDP-11 compiler), leave out certain floating
  34.     point support if it looks like it will not be needed.  In
  35.     particular, the non-floating-point versions of printf() and
  36.     scanf() save space by not including code to handle %e, %f, and
  37.     %g.  It happens that Borland's heuristics for determining
  38.     whether the program uses floating point are insufficient, and
  39.     the programmer must sometimes insert an extra, explicit call to
  40.     a floating-point library routine to force loading of floating-
  41.     point support.  (See the comp.os.msdos.programmer FAQ list for
  42.     more information.)
  43.  
  44. <end quote>
  45.  
  46. The faq list is available for anonymous ftp from rtfm.mit.edu
  47. /pub/usenet/comp.lang.c.  The comp.os.msdos.programmer list will be
  48. in /pub/usenet/comp.os.msdos.programmer (see a pattern here :-).
  49.  
  50. -- 
  51. John R Buchan           -:|:-     Looking for that elusive FAQ?  ftp to:
  52. jatmon@mail.iag.net     -:|:-     rtfm.mit.edu /pub/usenet-by-group/....
  53.  
  54.